Add Delta scheme to the integer compressor (unstable_encodings)#8212
Add Delta scheme to the integer compressor (unstable_encodings)#8212joseph-isaacs wants to merge 3 commits into
Conversation
df84a4d to
9e26f48
Compare
Polar Signals Profiling ResultsLatest Run
Previous Runs (3)
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals ProfilingVortex (geomean): 1.030x ➖ How to read Verdict and Engines
datafusion / vortex-file-compressed (1.030x ➖, 0↑ 2↓)
File Size Changes (1 files changed, -0.0% overall, 0↑ 1↓)
Totals:
|
Benchmarks: FineWeb NVMeVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.961x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.894x ✅, 7↑ 0↓)
datafusion / parquet (0.930x ➖, 3↑ 0↓)
duckdb / vortex-file-compressed (0.934x ➖, 3↑ 1↓)
duckdb / vortex-compact (0.906x ➖, 5↑ 0↓)
duckdb / parquet (0.911x ➖, 2↑ 0↓)
File Size Changes (2 files changed, +0.1% overall, 2↑ 0↓)
Totals:
Full attributed analysis
|
Benchmarks: TPC-H SF=1 on NVMEVerdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.003x ➖, 2↑ 3↓)
datafusion / vortex-compact (0.966x ➖, 0↑ 1↓)
datafusion / parquet (0.944x ➖, 2↑ 0↓)
datafusion / arrow (0.936x ➖, 8↑ 0↓)
duckdb / vortex-file-compressed (0.990x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.016x ➖, 0↑ 0↓)
duckdb / parquet (1.019x ➖, 0↑ 3↓)
duckdb / duckdb (1.008x ➖, 0↑ 1↓)
File Size Changes (9 files changed, -2.1% overall, 1↑ 8↓)
Totals:
Full attributed analysis
|
Merging this PR will improve performance by 23.41%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | baseline_eq[4, 65536] |
237.9 µs | 185.2 µs | +28.49% |
| ⚡ | Simulation | baseline_lt[16, 65536] |
275.5 µs | 217.7 µs | +26.59% |
| ⚡ | Simulation | baseline_lt[4, 65536] |
253.2 µs | 201 µs | +25.97% |
| ⚡ | Simulation | baseline_eq[16, 65536] |
260.5 µs | 230.1 µs | +13.2% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/modest-bohr-MHQIy (5ecbcb7) with develop (84a4a3f)
Benchmarks: TPC-DS SF=1 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.024x ➖, 1↑ 5↓)
datafusion / vortex-compact (0.976x ➖, 7↑ 0↓)
datafusion / parquet (1.032x ➖, 0↑ 7↓)
duckdb / vortex-file-compressed (0.986x ➖, 4↑ 2↓)
duckdb / vortex-compact (0.996x ➖, 4↑ 0↓)
duckdb / parquet (0.996x ➖, 0↑ 2↓)
duckdb / duckdb (1.022x ➖, 0↑ 1↓)
File Size Changes (15 files changed, -0.4% overall, 4↑ 11↓)
Totals:
Full attributed analysis
|
Benchmarks: FineWeb S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.012x ➖, 0↑ 0↓)
datafusion / vortex-compact (1.030x ➖, 0↑ 0↓)
datafusion / parquet (1.008x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (1.205x ➖, 0↑ 1↓)
duckdb / vortex-compact (1.072x ➖, 0↑ 1↓)
duckdb / parquet (1.014x ➖, 0↑ 0↓)
Full attributed analysis
|
Benchmarks: Statistical and Population GeneticsVerdict: No clear signal (low confidence) How to read Verdict and Engines
duckdb / vortex-file-compressed (1.076x ➖, 0↑ 2↓)
duckdb / vortex-compact (1.008x ➖, 0↑ 0↓)
duckdb / parquet (0.996x ➖, 0↑ 0↓)
File Size Changes (1 files changed, -4.5% overall, 0↑ 1↓)
Totals:
Full attributed analysis
|
Benchmarks: Random AccessVortex (geomean): 1.016x ➖ How to read Verdict and Engines
unknown / unknown (1.051x ➖, 0↑ 3↓)
|
Benchmarks: TPC-H SF=10 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.984x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.988x ➖, 0↑ 0↓)
datafusion / parquet (0.996x ➖, 0↑ 0↓)
datafusion / arrow (1.054x ➖, 0↑ 5↓)
duckdb / vortex-file-compressed (0.994x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.987x ➖, 0↑ 0↓)
duckdb / parquet (1.002x ➖, 0↑ 0↓)
duckdb / duckdb (0.998x ➖, 0↑ 0↓)
File Size Changes (36 files changed, -2.1% overall, 11↑ 25↓)
Totals:
Full attributed analysis
|
Benchmarks: Clickbench on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.071x ➖, 0↑ 12↓)
datafusion / parquet (1.048x ➖, 0↑ 7↓)
duckdb / vortex-file-compressed (0.998x ➖, 1↑ 1↓)
duckdb / parquet (1.003x ➖, 0↑ 0↓)
duckdb / duckdb (1.021x ➖, 1↑ 1↓)
File Size Changes (102 files changed, -0.4% overall, 6↑ 96↓)
Totals:
Full attributed analysis
|
Benchmarks: Appian on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.914x ➖, 2↑ 0↓)
datafusion / parquet (0.945x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed (0.962x ➖, 0↑ 0↓)
duckdb / parquet (0.950x ➖, 1↑ 0↓)
duckdb / duckdb (0.961x ➖, 0↑ 0↓)
File Size Changes (6 files changed, -4.8% overall, 2↑ 4↓)
Totals:
Full attributed analysis
|
Benchmarks: CompressionVortex (geomean): 0.997x ➖ How to read Verdict and Engines
unknown / unknown (0.986x ➖, 8↑ 0↓)
|
Benchmarks: TPC-H SF=10 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.953x ➖, 0↑ 0↓)
datafusion / vortex-compact (1.018x ➖, 0↑ 1↓)
datafusion / parquet (0.993x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed (0.802x ➖, 1↑ 0↓)
duckdb / vortex-compact (0.762x ➖, 4↑ 0↓)
duckdb / parquet (0.914x ➖, 0↑ 0↓)
Full attributed analysis
|
…clusion Enabling Delta in the default scheme set under `--all-features` (which turns on `unstable_encodings`) changed two things that CI caught: - `vortex-file open::tests::test_initial_read_size` built a "large" file from an alternating `i / -i` pattern, which Delta compresses to ~400KB and trips the `> 1MB` assertion. Switch to high-entropy pseudo-random values so the file stays large under any encoding. This was the only failure in both the coverage and CUDA test jobs. - `only_cuda_compatible()` must not emit Delta: there is no GPU decode kernel for it and its prefix-sum decode is inherently sequential, so exclude it from the CUDA-compatible scheme set, like RLE/Sparse/FSST. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Benchmarks: TPC-H SF=1 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.924x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.979x ➖, 1↑ 0↓)
datafusion / parquet (0.961x ➖, 1↑ 1↓)
duckdb / vortex-file-compressed (0.939x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.960x ➖, 0↑ 0↓)
duckdb / parquet (0.964x ➖, 0↑ 0↓)
Full attributed analysis
|
Lower DELTA_PENALTY from 0.9 to 0.95 so Delta is chosen more readily, requiring it to be only ~5% smaller than the best alternative rather than ~10%. This widens Delta's applicability for benchmarking its effect on query performance. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Add a FastLanes Delta encoding as a candidate in the BtrBlocks integer scheme set, gated behind the
unstable_encodingsfeature, in a newschemes/integer/delta.rsmodule.Selection uses a deferred callback that delta-encodes the array and measures the real transposed-delta residual span, then estimates the compression ratio as
full_width / delta_bits, multiplied by a DELTA_PENALTY (0.9) factor. The penalty makes the selector require Delta to be meaningfully smaller than the best alternative before it wins, rather than picking it for a single-bit gain, since Delta breaks random access and adds a prefix-sum decode pass.Delta is registered last among the integer schemes so it loses exact estimate ties to simpler, randomly-accessible encodings. A descendant exclusion (plus the compressor's built-in self-exclusion) guarantees Delta is applied at most once along any path in the tree, so already-delta-encoded data is never delta-encoded again.
Tests cover selection on a delta-favorable column, round-tripping, and the no-nested-delta invariant. The existing RLE selection test is updated to use scrambled (non-monotone) run values so it remains run-length-dominant rather than delta-favorable.
Summary
Closes: #000
Testing